﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Server
{
    public partial class frmStatus : Form
    {
        public frmStatus()
        {
            InitializeComponent();
        }

        public int  D_Client { get; set; }

        private void frmStatus_Load(object sender, EventArgs e)
        {
            if (BaseClass.ServerConnt)
            {
                lblSatatus.ForeColor = Color.Lime;
                lblSatatus.Text = "服务器已启动";
            }
            else
            {
                lblSatatus.ForeColor = Color.Red;
                lblSatatus.Text = "服务器未启动";
            }

            lblConnetCount.Text = D_Client + " 个客户端在线";
            lblTime.Text = BaseClass.StartTime.ToString();

            lblTimeLength.Text = "系统已经正常运行 " + BaseClass.ExecDateDiff(BaseClass.StartTime, DateTime.Now) + "  小时";
        }
    }
}
